package com.jiangnan.repository

import com.jiangnan.api.client.BookApiClient
import com.jiangnan.entity.CommentRequest
import com.jiangnan.entity.CommentResponse
import com.jiangnan.entity.Res

class CommentRepository {

  suspend fun listComments(page: Int, size: Int): Res<List<CommentResponse>> =
    BookApiClient.commentApiService.listComments(page, size)

  suspend fun postComment(req: CommentRequest): Res<CommentResponse> =
    BookApiClient.commentApiService.postComment(req)

  suspend fun deleteComment(id: Long): Res<Unit> =
    BookApiClient.commentApiService.deleteComment(id)
}